home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / IncrementalParameterUpdator.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  38.4 KB  |  897 lines  |  [TEXT/KAHL]

  1. /* IncrementalParameterUpdator.c */
  2. /*****************************************************************************/
  3. /*                                                                           */
  4. /*    Out Of Phase:  Digital Music Synthesis on General Purpose Computers    */
  5. /*    Copyright (C) 1994  Thomas R. Lawrence                                 */
  6. /*                                                                           */
  7. /*    This program is free software; you can redistribute it and/or modify   */
  8. /*    it under the terms of the GNU General Public License as published by   */
  9. /*    the Free Software Foundation; either version 2 of the License, or      */
  10. /*    (at your option) any later version.                                    */
  11. /*                                                                           */
  12. /*    This program is distributed in the hope that it will be useful,        */
  13. /*    but WITHOUT ANY WARRANTY; without even the implied warranty of         */
  14. /*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          */
  15. /*    GNU General Public License for more details.                           */
  16. /*                                                                           */
  17. /*    You should have received a copy of the GNU General Public License      */
  18. /*    along with this program; if not, write to the Free Software            */
  19. /*    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.              */
  20. /*                                                                           */
  21. /*    Thomas R. Lawrence can be reached at tomlaw@world.std.com.             */
  22. /*                                                                           */
  23. /*****************************************************************************/
  24.  
  25. #include "MiscInfo.h"
  26. #include "Audit.h"
  27. #include "Debug.h"
  28. #include "Definitions.h"
  29.  
  30. #define ShowMeIncrParamUpdateRec
  31. #define ShowMe_NoteObjectRec;
  32. #include "IncrementalParameterUpdator.h"
  33. #include "PlayTrackInfoThang.h"
  34. #include "Memory.h"
  35. #include "TrackObject.h"
  36. #include "LinearTransition.h"
  37. #include "NoteObject.h"
  38. #include "FrameObject.h"
  39. #include "TempoController.h"
  40.  
  41.  
  42. /* build a new incremental parameter updator */
  43. IncrParamUpdateRec*        NewInitializedParamUpdator(struct TrackObjectRec* Template,
  44.                                                 struct TempoControlRec* TempoControl)
  45.     {
  46.         IncrParamUpdateRec*    Updator;
  47.  
  48.         CheckPtrExistence(Template);
  49.  
  50.         Updator = (IncrParamUpdateRec*)AllocPtrCanFail(sizeof(IncrParamUpdateRec),
  51.             "IncrParamUpdateRec");
  52.         if (Updator == NIL)
  53.             {
  54.              FailurePoint1:
  55.                 return NIL;
  56.             }
  57.  
  58.         Updator->DefaultStereoPosition = Double2LargeBCD(
  59.             TrackObjectGetStereoPositioning(Template));
  60.         Updator->CurrentStereoPosition = Updator->DefaultStereoPosition;
  61.         Updator->StereoPositionChange = NewLinearTransition(0,0,1);
  62.         if (Updator->StereoPositionChange == NIL)
  63.             {
  64.              FailurePoint2:
  65.                 ReleasePtr((char*)Updator);
  66.                 goto FailurePoint1;
  67.             }
  68.         Updator->StereoPositionChangeCountdown = 0;
  69.  
  70.         Updator->DefaultVolume = Double2LargeBCD(TrackObjectGetOverallLoudness(Template));
  71.         Updator->CurrentVolume = Updator->DefaultVolume;
  72.         Updator->VolumeChange = NewLinearTransition(0,0,1);
  73.         if (Updator->VolumeChange == NIL)
  74.             {
  75.              FailurePoint3:
  76.                 DisposeLinearTransition(Updator->StereoPositionChange);
  77.                 goto FailurePoint2;
  78.             }
  79.         Updator->VolumeChangeCountdown = 0;
  80.  
  81.         Updator->DefaultReleasePoint1 = Double2LargeBCD(
  82.             TrackObjectGetReleasePoint1(Template));
  83.         Updator->CurrentReleasePoint1 = Updator->DefaultReleasePoint1;
  84.         Updator->ReleasePoint1Change = NewLinearTransition(0,0,1);
  85.         if (Updator->ReleasePoint1Change == NIL)
  86.             {
  87.              FailurePoint4:
  88.                 DisposeLinearTransition(Updator->VolumeChange);
  89.                 goto FailurePoint3;
  90.             }
  91.         Updator->ReleasePoint1ChangeCountdown = 0;
  92.         switch (TrackObjectGetReleasePoint1StartEndFlag(Template))
  93.             {
  94.                 default:
  95.                     EXECUTE(PRERR(ForceAbort,"NewInitializedParamUpdator:  bad value "
  96.                         "from TrackObjectGetReleasePoint1StartEndFlag"));
  97.                     break;
  98.                 case eRelease1FromStart:
  99.                     Updator->ReleasePoint1FromStart = True;
  100.                     break;
  101.                 case eRelease1FromEnd:
  102.                     Updator->ReleasePoint1FromStart = False;
  103.                     break;
  104.             }
  105.  
  106.         Updator->DefaultReleasePoint2 = Double2LargeBCD(
  107.             TrackObjectGetReleasePoint2(Template));
  108.         Updator->CurrentReleasePoint2 = Updator->DefaultReleasePoint2;
  109.         Updator->ReleasePoint2Change = NewLinearTransition(0,0,1);
  110.         if (Updator->ReleasePoint2Change == NIL)
  111.             {
  112.              FailurePoint5:
  113.                 DisposeLinearTransition(Updator->ReleasePoint1Change);
  114.                 goto FailurePoint4;
  115.             }
  116.         Updator->ReleasePoint2ChangeCountdown = 0;
  117.         switch (TrackObjectGetReleasePoint2StartEndFlag(Template))
  118.             {
  119.                 default:
  120.                     EXECUTE(PRERR(ForceAbort,"NewInitializedParamUpdator:  bad value "
  121.                         "from TrackObjectGetReleasePoint2StartEndFlag"));
  122.                     break;
  123.                 case eRelease2FromStart:
  124.                     Updator->ReleasePoint2FromStart = True;
  125.                     break;
  126.                 case eRelease2FromEnd:
  127.                     Updator->ReleasePoint2FromStart = False;
  128.                     break;
  129.             }
  130.  
  131.         Updator->DefaultAccent1 = Double2LargeBCD(TrackObjectGetAccent1(Template));
  132.         Updator->CurrentAccent1 = Updator->DefaultAccent1;
  133.         Updator->Accent1Change = NewLinearTransition(0,0,1);
  134.         if (Updator->Accent1Change == NIL)
  135.             {
  136.              FailurePoint6:
  137.                 DisposeLinearTransition(Updator->ReleasePoint2Change);
  138.                 goto FailurePoint5;
  139.             }
  140.         Updator->Accent1ChangeCountdown = 0;
  141.  
  142.         Updator->DefaultAccent2 = Double2LargeBCD(TrackObjectGetAccent2(Template));
  143.         Updator->CurrentAccent2 = Updator->DefaultAccent2;
  144.         Updator->Accent2Change = NewLinearTransition(0,0,1);
  145.         if (Updator->Accent2Change == NIL)
  146.             {
  147.              FailurePoint7:
  148.                 DisposeLinearTransition(Updator->Accent1Change);
  149.                 goto FailurePoint6;
  150.             }
  151.         Updator->Accent2ChangeCountdown = 0;
  152.  
  153.         Updator->DefaultAccent3 = Double2LargeBCD(TrackObjectGetAccent3(Template));
  154.         Updator->CurrentAccent3 = Updator->DefaultAccent3;
  155.         Updator->Accent3Change = NewLinearTransition(0,0,1);
  156.         if (Updator->Accent3Change == NIL)
  157.             {
  158.              FailurePoint8:
  159.                 DisposeLinearTransition(Updator->Accent2Change);
  160.                 goto FailurePoint7;
  161.             }
  162.         Updator->Accent3ChangeCountdown = 0;
  163.  
  164.         Updator->DefaultAccent4 = Double2LargeBCD(TrackObjectGetAccent4(Template));
  165.         Updator->CurrentAccent4 = Updator->DefaultAccent4;
  166.         Updator->Accent4Change = NewLinearTransition(0,0,1);
  167.         if (Updator->Accent4Change == NIL)
  168.             {
  169.              FailurePoint9:
  170.                 DisposeLinearTransition(Updator->Accent3Change);
  171.                 goto FailurePoint8;
  172.             }
  173.         Updator->Accent4ChangeCountdown = 0;
  174.  
  175.         Updator->DefaultPitchDisplacementDepthLimit = Double2LargeBCD(
  176.             TrackObjectGetPitchDisplacementDepthAdjust(Template));
  177.         Updator->CurrentPitchDisplacementDepthLimit = Updator->DefaultPitchDisplacementDepthLimit;
  178.         Updator->PitchDisplacementDepthLimitChange = NewLinearTransition(0,0,1);
  179.         if (Updator->PitchDisplacementDepthLimitChange == NIL)
  180.             {
  181.              FailurePoint10:
  182.                 DisposeLinearTransition(Updator->Accent4Change);
  183.                 goto FailurePoint9;
  184.             }
  185.         Updator->PitchDisplacementDepthLimitChangeCountdown = 0;
  186.         switch (TrackObjectGetPitchDisplacementDepthControlFlag(Template))
  187.             {
  188.                 default:
  189.                     EXECUTE(PRERR(ForceAbort,"NewInitializedParamUpdator:  bad value "
  190.                         "from TrackObjectGetPitchDisplacementDepthControlFlag"));
  191.                     break;
  192.                 case ePitchDisplacementDepthModeHalfSteps:
  193.                     Updator->PitchDisplacementDepthHertz = False;
  194.                     break;
  195.                 case ePitchDisplacementDepthModeHertz:
  196.                     Updator->PitchDisplacementDepthHertz = True;
  197.                     break;
  198.             }
  199.  
  200.         Updator->DefaultPitchDisplacementRateLimit = Double2LargeBCD(
  201.             TrackObjectGetPitchDisplacementRateAdjust(Template));
  202.         Updator->CurrentPitchDisplacementRateLimit = Updator->DefaultPitchDisplacementRateLimit;
  203.         Updator->PitchDisplacementRateLimitChange = NewLinearTransition(0,0,1);
  204.         if (Updator->PitchDisplacementRateLimitChange == NIL)
  205.             {
  206.              FailurePoint11:
  207.                 DisposeLinearTransition(Updator->PitchDisplacementDepthLimitChange);
  208.                 goto FailurePoint10;
  209.             }
  210.         Updator->PitchDisplacementRateLimitChangeCountdown = 0;
  211.  
  212.         Updator->DefaultPitchDisplacementStartPoint = Double2LargeBCD(
  213.             TrackObjectGetPitchDisplacementStartPoint(Template));
  214.         Updator->CurrentPitchDisplacementStartPoint = Updator->DefaultPitchDisplacementStartPoint;
  215.         Updator->PitchDisplacementStartPointChange = NewLinearTransition(0,0,1);
  216.         if (Updator->PitchDisplacementStartPointChange == NIL)
  217.             {
  218.              FailurePoint12:
  219.                 DisposeLinearTransition(Updator->PitchDisplacementRateLimitChange);
  220.                 goto FailurePoint11;
  221.             }
  222.         Updator->PitchDisplacementStartPointChangeCountdown = 0;
  223.         switch (TrackObjectGetPitchDisplacementFromStartOrEnd(Template))
  224.             {
  225.                 default:
  226.                     EXECUTE(PRERR(ForceAbort,"NewInitializedParamUpdator:  bad value "
  227.                         "from TrackObjectGetPitchDisplacementFromStartOrEnd"));
  228.                     break;
  229.                 case ePitchDisplacementStartFromStart:
  230.                     Updator->PitchDisplacementStartPointFromStart = True;
  231.                     break;
  232.                 case ePitchDisplacementStartFromEnd:
  233.                     Updator->PitchDisplacementStartPointFromStart = False;
  234.                     break;
  235.             }
  236.  
  237.         Updator->DefaultHurryUp = Double2LargeBCD(TrackObjectGetHurryUp(Template));
  238.         Updator->CurrentHurryUp = Updator->DefaultHurryUp;
  239.         Updator->HurryUpChange = NewLinearTransition(0,0,1);
  240.         if (Updator->HurryUpChange == NIL)
  241.             {
  242.              FailurePoint13:
  243.                 DisposeLinearTransition(Updator->PitchDisplacementStartPointChange);
  244.                 goto FailurePoint12;
  245.             }
  246.         Updator->HurryUpChangeCountdown = 0;
  247.  
  248.         Updator->DefaultDetune = Double2LargeBCD(TrackObjectGetDetune(Template));
  249.         Updator->CurrentDetune = Updator->DefaultDetune;
  250.         Updator->DetuneChange = NewLinearTransition(0,0,1);
  251.         if (Updator->DetuneChange == NIL)
  252.             {
  253.              FailurePoint14:
  254.                 DisposeLinearTransition(Updator->HurryUpChange);
  255.                 goto FailurePoint13;
  256.             }
  257.         Updator->DetuneChangeCountdown = 0;
  258.         switch (TrackObjectGetDetuneControlFlag(Template))
  259.             {
  260.                 default:
  261.                     EXECUTE(PRERR(ForceAbort,"NewInitializedParamUpdator:  bad value "
  262.                         "from TrackObjectGetDetuneControlFlag"));
  263.                     break;
  264.                 case eDetuningModeHalfSteps:
  265.                     Updator->DetuneHertz = False;
  266.                     break;
  267.                 case eDetuningModeHertz:
  268.                     Updator->DetuneHertz = True;
  269.                     break;
  270.             }
  271.  
  272.         Updator->DefaultEarlyLateAdjust = Double2LargeBCD(
  273.             TrackObjectGetEarlyLateAdjust(Template));
  274.         Updator->CurrentEarlyLateAdjust = Updator->DefaultEarlyLateAdjust;
  275.         Updator->EarlyLateAdjustChange = NewLinearTransition(0,0,1);
  276.         if (Updator->EarlyLateAdjustChange == NIL)
  277.             {
  278.              FailurePoint15:
  279.                 DisposeLinearTransition(Updator->DetuneChange);
  280.                 goto FailurePoint14;
  281.             }
  282.         Updator->EarlyLateAdjustChangeCountdown = 0;
  283.  
  284.         Updator->DefaultDurationAdjust = Double2LargeBCD(
  285.             TrackObjectGetDurationAdjust(Template));
  286.         Updator->CurrentDurationAdjust = Updator->DefaultDurationAdjust;
  287.         Updator->DurationAdjustChange = NewLinearTransition(0,0,1);
  288.         if (Updator->DurationAdjustChange == NIL)
  289.             {
  290.              FailurePoint16:
  291.                 DisposeLinearTransition(Updator->EarlyLateAdjustChange);
  292.                 goto FailurePoint15;
  293.             }
  294.         Updator->DurationAdjustChangeCountdown = 0;
  295.         switch (TrackObjectGetDurationModeFlag(Template))
  296.             {
  297.                 default:
  298.                     EXECUTE(PRERR(ForceAbort,"NewInitializedParamUpdator:  bad value "
  299.                         "from TrackObjectGetDurationModeFlag"));
  300.                     break;
  301.                 case eDurationAdjustAdditive:
  302.                     Updator->DurationAdjustAdditive = True;
  303.                     break;
  304.                 case eDurationAdjustMultiplicative:
  305.                     Updator->DurationAdjustAdditive = False;
  306.                     break;
  307.             }
  308.  
  309.         Updator->DefaultSurroundPosition = Double2LargeBCD(
  310.             TrackObjectGetSurroundPositioning(Template));
  311.         Updator->CurrentSurroundPosition = Updator->DefaultSurroundPosition;
  312.         Updator->SurroundPositionChange = NewLinearTransition(0,0,1);
  313.         if (Updator->SurroundPositionChange == NIL)
  314.             {
  315.              FailurePoint17:
  316.                 DisposeLinearTransition(Updator->DurationAdjustChange);
  317.                 goto FailurePoint16;
  318.             }
  319.  
  320.         Updator->TempoControl = TempoControl;
  321.  
  322.         Updator->TransposeHalfsteps = 0;
  323.  
  324.         return Updator;
  325.     }
  326.  
  327.  
  328. /* dispose of the incremental parameter updator */
  329. void                                    DisposeParamUpdator(IncrParamUpdateRec* Updator)
  330.     {
  331.         CheckPtrExistence(Updator);
  332.  
  333.         DisposeLinearTransition(Updator->StereoPositionChange);
  334.         DisposeLinearTransition(Updator->VolumeChange);
  335.         DisposeLinearTransition(Updator->ReleasePoint1Change);
  336.         DisposeLinearTransition(Updator->ReleasePoint2Change);
  337.         DisposeLinearTransition(Updator->Accent1Change);
  338.         DisposeLinearTransition(Updator->Accent2Change);
  339.         DisposeLinearTransition(Updator->Accent3Change);
  340.         DisposeLinearTransition(Updator->Accent4Change);
  341.         DisposeLinearTransition(Updator->PitchDisplacementDepthLimitChange);
  342.         DisposeLinearTransition(Updator->PitchDisplacementRateLimitChange);
  343.         DisposeLinearTransition(Updator->PitchDisplacementStartPointChange);
  344.         DisposeLinearTransition(Updator->HurryUpChange);
  345.         DisposeLinearTransition(Updator->DetuneChange);
  346.         DisposeLinearTransition(Updator->EarlyLateAdjustChange);
  347.         DisposeLinearTransition(Updator->DurationAdjustChange);
  348.         DisposeLinearTransition(Updator->SurroundPositionChange);
  349.  
  350.         ReleasePtr((char*)Updator);
  351.     }
  352.  
  353.  
  354. static void                        UpdateOne(LargeBCDType* Current, LinearTransRec* Change,
  355.                                                 long* ChangeCountdown, long NumTicks)
  356.     {
  357.         if (NumTicks < *ChangeCountdown)
  358.             {
  359.                 *Current = LinearTransitionUpdateMultiple(Change,NumTicks);
  360.                 *ChangeCountdown -= NumTicks;
  361.             }
  362.         else if (*ChangeCountdown > 0)
  363.             {
  364.                 *Current = LinearTransitionUpdateMultiple(Change,*ChangeCountdown);
  365.                 *ChangeCountdown = 0;
  366.             }
  367.     }
  368.  
  369.  
  370. /* execute a series of update cycles.  the value passed in is the number of */
  371. /* duration ticks.  there are DURATIONUPDATECLOCKRESOLUTION (64*2*3*5*7) ticks */
  372. /* in a whole note */
  373. void                                    ExecuteParamUpdate(IncrParamUpdateRec* Updator, long NumTicks)
  374.     {
  375.         CheckPtrExistence(Updator);
  376.  
  377.         UpdateOne(&Updator->CurrentStereoPosition,Updator->StereoPositionChange,
  378.             &Updator->StereoPositionChangeCountdown,NumTicks);
  379.         UpdateOne(&Updator->CurrentVolume,Updator->VolumeChange,
  380.             &Updator->VolumeChangeCountdown,NumTicks);
  381.         UpdateOne(&Updator->CurrentReleasePoint1,Updator->ReleasePoint1Change,
  382.             &Updator->ReleasePoint1ChangeCountdown,NumTicks);
  383.         UpdateOne(&Updator->CurrentReleasePoint2,Updator->ReleasePoint2Change,
  384.             &Updator->ReleasePoint2ChangeCountdown,NumTicks);
  385.         UpdateOne(&Updator->CurrentAccent1,Updator->Accent1Change,
  386.             &Updator->Accent1ChangeCountdown,NumTicks);
  387.         UpdateOne(&Updator->CurrentAccent2,Updator->Accent2Change,
  388.             &Updator->Accent2ChangeCountdown,NumTicks);
  389.         UpdateOne(&Updator->CurrentAccent3,Updator->Accent3Change,
  390.             &Updator->Accent3ChangeCountdown,NumTicks);
  391.         UpdateOne(&Updator->CurrentAccent4,Updator->Accent4Change,
  392.             &Updator->Accent4ChangeCountdown,NumTicks);
  393.         UpdateOne(&Updator->CurrentPitchDisplacementDepthLimit,
  394.             Updator->PitchDisplacementDepthLimitChange,
  395.             &Updator->PitchDisplacementDepthLimitChangeCountdown,NumTicks);
  396.         UpdateOne(&Updator->CurrentPitchDisplacementRateLimit,
  397.             Updator->PitchDisplacementRateLimitChange,
  398.             &Updator->PitchDisplacementRateLimitChangeCountdown,NumTicks);
  399.         UpdateOne(&Updator->CurrentPitchDisplacementStartPoint,
  400.             Updator->PitchDisplacementStartPointChange,
  401.             &Updator->PitchDisplacementStartPointChangeCountdown,NumTicks);
  402.         UpdateOne(&Updator->CurrentHurryUp,Updator->HurryUpChange,
  403.             &Updator->HurryUpChangeCountdown,NumTicks);
  404.         UpdateOne(&Updator->CurrentDetune,Updator->DetuneChange,
  405.             &Updator->DetuneChangeCountdown,NumTicks);
  406.         UpdateOne(&Updator->CurrentEarlyLateAdjust,Updator->EarlyLateAdjustChange,
  407.             &Updator->EarlyLateAdjustChangeCountdown,NumTicks);
  408.         UpdateOne(&Updator->CurrentDurationAdjust,Updator->DurationAdjustChange,
  409.             &Updator->DurationAdjustChangeCountdown,NumTicks);
  410.         UpdateOne(&Updator->CurrentSurroundPosition,Updator->SurroundPositionChange,
  411.             &Updator->SurroundPositionChangeCountdown,NumTicks);
  412.     }
  413.  
  414.  
  415. /* sweep the value to a new value */
  416. static void                            SweepToNewValue(LargeBCDType Current,
  417.                                                     LinearTransRec* Change, long* ChangeCountdown,
  418.                                                     LargeBCDType TargetValue, SmallExtBCDType NumBeatsToReach)
  419.     {
  420.         *ChangeCountdown = SmallExtBCD2Double(NumBeatsToReach)
  421.             * (DURATIONUPDATECLOCKRESOLUTION / 4);
  422.         RefillLinearTransition(Change,Current,TargetValue,*ChangeCountdown);
  423.     }
  424.  
  425.  
  426. /* sweep to a new value relative to the current value */
  427. static void                            SweepToAdjustedValue(LargeBCDType Current,
  428.                                                     LinearTransRec* Change, long* ChangeCountdown,
  429.                                                     LargeBCDType TargetValue, SmallExtBCDType NumBeatsToReach)
  430.     {
  431.         *ChangeCountdown = SmallExtBCD2Double(NumBeatsToReach)
  432.             * (DURATIONUPDATECLOCKRESOLUTION / 4);
  433.         RefillLinearTransition(Change,Current,TargetValue + Current,*ChangeCountdown);
  434.     }
  435.  
  436.  
  437. /* sweep to a new value relative to the current value */
  438. static void                            SweepToAdjustedValueMultiplicatively(LargeBCDType Current,
  439.                                                     LinearTransRec* Change, long* ChangeCountdown,
  440.                                                     LargeBCDType TargetValue, SmallExtBCDType NumBeatsToReach)
  441.     {
  442.         *ChangeCountdown = SmallExtBCD2Double(NumBeatsToReach)
  443.             * (DURATIONUPDATECLOCKRESOLUTION / 4);
  444.         RefillLinearTransition(Change,Current,Double2LargeBCD(LargeBCD2Double(TargetValue)
  445.             * LargeBCD2Double(Current)),*ChangeCountdown);
  446.     }
  447.  
  448.  
  449. /* evaluate a command frame & set any parameters accordingly */
  450. void                                    ExecuteParamCommandFrame(IncrParamUpdateRec* Updator,
  451.                                                 struct FrameObjectRec* CommandFrame)
  452.     {
  453.         NoteObjectRec*            Note;
  454.  
  455.         CheckPtrExistence(Updator);
  456.         CheckPtrExistence(CommandFrame);
  457.         Note = GetNoteFromFrame(CommandFrame,0);
  458.         CheckPtrExistence(Note);
  459.         ERROR(!IsItACommand(Note),PRERR(ForceAbort,
  460.             "ExecuteParamCommandFrame:  not a command frame"));
  461.  
  462.         switch (Note->Flags & ~eCommandFlag)
  463.             {
  464.                 default:
  465.                     EXECUTE(PRERR(ForceAbort,"ExecuteParamCommandFrame:  unknown command opcode"));
  466.                     break;
  467.  
  468.                 case eCmdRestoreTempo: /* restore the tempo to the default for the score */
  469.                     TempoControlRestoreDefault(Updator->TempoControl);
  470.                     break;
  471.                 case eCmdSetTempo: /* set tempo to <1xs> number of beats per second */
  472.                     TempoControlSetBeatsPerMinute(Updator->TempoControl,
  473.                         SmallExtBCD2LargeBCD(Note->a.Command.Argument1));
  474.                     break;
  475.                 case eCmdIncTempo: /* add <1xs> to the tempo control */
  476.                     TempoControlAdjustBeatsPerMinute(Updator->TempoControl,
  477.                         SmallExtBCD2LargeBCD(Note->a.Command.Argument1));
  478.                     break;
  479.                 case eCmdSweepTempoAbs: /* <1xs> = target tempo, <2xs> = # of beats to reach it */
  480.                     TempoControlSweepToNewValue(Updator->TempoControl,
  481.                         SmallExtBCD2LargeBCD(Note->a.Command.Argument1),Note->a.Command.Argument2);
  482.                     break;
  483.                 case eCmdSweepTempoRel: /* <1xs> = target adjust (add to tempo), <2xs> = # beats */
  484.                     TempoControlSweepToAdjustedValue(Updator->TempoControl,
  485.                         SmallExtBCD2LargeBCD(Note->a.Command.Argument1),Note->a.Command.Argument2);
  486.                     break;
  487.  
  488.                 case eCmdRestoreStereoPosition: /* restore stereo position to channel's default */
  489.                     Updator->CurrentStereoPosition = Updator->DefaultStereoPosition;
  490.                     Updator->StereoPositionChangeCountdown = 0;
  491.                     break;
  492.                 case eCmdSetStereoPosition: /* set position in channel <1l>: -1 = left, 1 = right */
  493.                     Updator->CurrentStereoPosition = Note->a.Command.Argument1;
  494.                     Updator->StereoPositionChangeCountdown = 0;
  495.                     break;
  496.                 case eCmdIncStereoPosition: /* adjust stereo position by adding <1l> */
  497.                     Updator->CurrentStereoPosition += Note->a.Command.Argument1;
  498.                     Updator->StereoPositionChangeCountdown = 0;
  499.                     break;
  500.                 case eCmdSweepStereoAbs: /* <1l> = new pos, <2xs> = # of beats to get there */
  501.                     SweepToNewValue(Updator->CurrentStereoPosition,Updator->StereoPositionChange,
  502.                         &Updator->StereoPositionChangeCountdown,Note->a.Command.Argument1,
  503.                         Note->a.Command.Argument2);
  504.                     break;
  505.                 case eCmdSweepStereoRel: /* <1l> = pos adjust, <2xs> = # beats to get there */
  506.                     SweepToAdjustedValue(Updator->CurrentStereoPosition,
  507.                         Updator->StereoPositionChange,&Updator->StereoPositionChangeCountdown,
  508.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  509.                     break;
  510.  
  511.                 case eCmdRestoreSurroundPosition: /* restore surround position to channel's default */
  512.                     Updator->CurrentSurroundPosition = Updator->DefaultSurroundPosition;
  513.                     Updator->SurroundPositionChangeCountdown = 0;
  514.                     break;
  515.                 case eCmdSetSurroundPosition: /* set position in channel <1l>: 1 = front, -1 = rear */
  516.                     Updator->CurrentSurroundPosition = Note->a.Command.Argument1;
  517.                     Updator->SurroundPositionChangeCountdown = 0;
  518.                     break;
  519.                 case eCmdIncSurroundPosition: /* adjust surround position by adding <1l> */
  520.                     Updator->CurrentSurroundPosition += Note->a.Command.Argument1;
  521.                     Updator->SurroundPositionChangeCountdown = 0;
  522.                     break;
  523.                 case eCmdSweepSurroundAbs: /* <1l> = new pos, <2xs> = # of beats to get there */
  524.                     SweepToNewValue(Updator->CurrentSurroundPosition,Updator->SurroundPositionChange,
  525.                         &Updator->SurroundPositionChangeCountdown,Note->a.Command.Argument1,
  526.                         Note->a.Command.Argument2);
  527.                     break;
  528.                 case eCmdSweepSurroundRel: /* <1l> = pos adjust, <2xs> = # beats to get there */
  529.                     SweepToAdjustedValue(Updator->CurrentSurroundPosition,
  530.                         Updator->SurroundPositionChange,&Updator->SurroundPositionChangeCountdown,
  531.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  532.                     break;
  533.  
  534.                 case eCmdRestoreVolume: /* restore the volume to the default for the channel */
  535.                     Updator->CurrentVolume = Updator->DefaultVolume;
  536.                     Updator->VolumeChangeCountdown = 0;
  537.                     break;
  538.                 case eCmdSetVolume: /* set the volume to the specified level (0..1) in <1l> */
  539.                     Updator->CurrentVolume = Note->a.Command.Argument1;
  540.                     Updator->VolumeChangeCountdown = 0;
  541.                     break;
  542.                 case eCmdIncVolume: /* multiply <1l> by the volume control */
  543.                     Updator->CurrentVolume = Double2LargeBCD(LargeBCD2Double(
  544.                         Note->a.Command.Argument1) * LargeBCD2Double(Updator->CurrentVolume));
  545.                     Updator->VolumeChangeCountdown = 0;
  546.                     break;
  547.                 case eCmdSweepVolumeAbs: /* <1l> = new volume, <2xs> = # of beats to reach it */
  548.                     SweepToNewValue(Updator->CurrentVolume,Updator->VolumeChange,
  549.                         &Updator->VolumeChangeCountdown,Note->a.Command.Argument1,
  550.                         Note->a.Command.Argument2);
  551.                     break;
  552.                 case eCmdSweepVolumeRel: /* <1l> = volume adjust, <2xs> = # of beats to reach it */
  553.                     SweepToAdjustedValueMultiplicatively(Updator->CurrentVolume,
  554.                         Updator->VolumeChange,&Updator->VolumeChangeCountdown,
  555.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  556.                     break;
  557.  
  558.                 case eCmdRestoreReleasePoint1: /* restore release point to master default */
  559.                     Updator->CurrentReleasePoint1 = Updator->DefaultReleasePoint1;
  560.                     Updator->ReleasePoint1ChangeCountdown = 0;
  561.                     break;
  562.                 case eCmdSetReleasePoint1: /* set the default release point to new value <1l> */
  563.                     Updator->CurrentReleasePoint1 = Note->a.Command.Argument1;
  564.                     Updator->ReleasePoint1ChangeCountdown = 0;
  565.                     break;
  566.                 case eCmdIncReleasePoint1: /* add <1l> to default release point for adjustment */
  567.                     Updator->CurrentReleasePoint1 += Note->a.Command.Argument1;
  568.                     Updator->ReleasePoint1ChangeCountdown = 0;
  569.                     break;
  570.                 case eCmdReleasePointOrigin1: /* <1i> -1 = from start, 0 = from end of note */
  571.                     Updator->ReleasePoint1FromStart = (Note->a.Command.Argument1 < 0);
  572.                     break;
  573.                 case eCmdSweepReleaseAbs1: /* <1l> = new release, <2xs> = # of beats to get there */
  574.                     SweepToNewValue(Updator->CurrentReleasePoint1,Updator->ReleasePoint1Change,
  575.                         &Updator->ReleasePoint1ChangeCountdown,Note->a.Command.Argument1,
  576.                         Note->a.Command.Argument2);
  577.                     break;
  578.                 case eCmdSweepReleaseRel1: /* <1l> = release adjust, <2xs> = # of beats to get there */
  579.                     SweepToAdjustedValue(Updator->CurrentReleasePoint1,
  580.                         Updator->ReleasePoint1Change,&Updator->ReleasePoint1ChangeCountdown,
  581.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  582.                     break;
  583.  
  584.                 case eCmdRestoreReleasePoint2: /* restore release point to master default */
  585.                     Updator->CurrentReleasePoint2 = Updator->DefaultReleasePoint2;
  586.                     Updator->ReleasePoint2ChangeCountdown = 0;
  587.                     break;
  588.                 case eCmdSetReleasePoint2: /* set the default release point to new value <1l> */
  589.                     Updator->CurrentReleasePoint2 = Note->a.Command.Argument1;
  590.                     Updator->ReleasePoint2ChangeCountdown = 0;
  591.                     break;
  592.                 case eCmdIncReleasePoint2: /* add <1l> to default release point for adjustment */
  593.                     Updator->CurrentReleasePoint2 += Note->a.Command.Argument1;
  594.                     Updator->ReleasePoint2ChangeCountdown = 0;
  595.                     break;
  596.                 case eCmdReleasePointOrigin2: /* <1i> -1 = from start, 0 = from end of note */
  597.                     Updator->ReleasePoint2FromStart = (Note->a.Command.Argument1 < 0);
  598.                     break;
  599.                 case eCmdSweepReleaseAbs2: /* <1l> = new release, <2xs> = # of beats to get there */
  600.                     SweepToNewValue(Updator->CurrentReleasePoint2,Updator->ReleasePoint2Change,
  601.                         &Updator->ReleasePoint2ChangeCountdown,Note->a.Command.Argument1,
  602.                         Note->a.Command.Argument2);
  603.                     break;
  604.                 case eCmdSweepReleaseRel2: /* <1l> = release adjust, <2xs> = # of beats to get there */
  605.                     SweepToAdjustedValue(Updator->CurrentReleasePoint2,
  606.                         Updator->ReleasePoint2Change,&Updator->ReleasePoint2ChangeCountdown,
  607.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  608.                     break;
  609.  
  610.                 case eCmdRestoreAccent1: /* restore accent value to master default */
  611.                     Updator->CurrentAccent1 = Updator->DefaultAccent1;
  612.                     Updator->Accent1ChangeCountdown = 0;
  613.                     break;
  614.                 case eCmdSetAccent1: /* specify the new default accent in <1l> */
  615.                     Updator->CurrentAccent1 = Note->a.Command.Argument1;
  616.                     Updator->Accent1ChangeCountdown = 0;
  617.                     break;
  618.                 case eCmdIncAccent1: /* add <1l> to the default accent */
  619.                     Updator->CurrentAccent1 += Note->a.Command.Argument1;
  620.                     Updator->Accent1ChangeCountdown = 0;
  621.                     break;
  622.                 case eCmdSweepAccentAbs1: /* <1l> = new accent, <2xs> = # of beats to get there */
  623.                     SweepToNewValue(Updator->CurrentAccent1,Updator->Accent1Change,
  624.                         &Updator->Accent1ChangeCountdown,Note->a.Command.Argument1,
  625.                         Note->a.Command.Argument2);
  626.                     break;
  627.                 case eCmdSweepAccentRel1: /* <1l> = accent adjust, <2xs> = # of beats to get there */
  628.                     SweepToAdjustedValue(Updator->CurrentAccent1,Updator->Accent1Change,
  629.                         &Updator->Accent1ChangeCountdown,Note->a.Command.Argument1,
  630.                         Note->a.Command.Argument2);
  631.                     break;
  632.  
  633.                 case eCmdRestoreAccent2: /* restore accent value to master default */
  634.                     Updator->CurrentAccent2 = Updator->DefaultAccent2;
  635.                     Updator->Accent2ChangeCountdown = 0;
  636.                     break;
  637.                 case eCmdSetAccent2: /* specify the new default accent in <1l> */
  638.                     Updator->CurrentAccent2 = Note->a.Command.Argument1;
  639.                     Updator->Accent2ChangeCountdown = 0;
  640.                     break;
  641.                 case eCmdIncAccent2: /* add <1l> to the default accent */
  642.                     Updator->CurrentAccent2 += Note->a.Command.Argument1;
  643.                     Updator->Accent2ChangeCountdown = 0;
  644.                     break;
  645.                 case eCmdSweepAccentAbs2: /* <1l> = new accent, <2xs> = # of beats to get there */
  646.                     SweepToNewValue(Updator->CurrentAccent2,Updator->Accent2Change,
  647.                         &Updator->Accent2ChangeCountdown,Note->a.Command.Argument1,
  648.                         Note->a.Command.Argument2);
  649.                     break;
  650.                 case eCmdSweepAccentRel2: /* <1l> = accent adjust, <2xs> = # of beats to get there */
  651.                     SweepToAdjustedValue(Updator->CurrentAccent2,Updator->Accent2Change,
  652.                         &Updator->Accent2ChangeCountdown,Note->a.Command.Argument1,
  653.                         Note->a.Command.Argument2);
  654.                     break;
  655.  
  656.                 case eCmdRestoreAccent3: /* restore accent value to master default */
  657.                     Updator->CurrentAccent3 = Updator->DefaultAccent3;
  658.                     Updator->Accent3ChangeCountdown = 0;
  659.                     break;
  660.                 case eCmdSetAccent3: /* specify the new default accent in <1l> */
  661.                     Updator->CurrentAccent3 = Note->a.Command.Argument1;
  662.                     Updator->Accent3ChangeCountdown = 0;
  663.                     break;
  664.                 case eCmdIncAccent3: /* add <1l> to the default accent */
  665.                     Updator->CurrentAccent3 += Note->a.Command.Argument1;
  666.                     Updator->Accent3ChangeCountdown = 0;
  667.                     break;
  668.                 case eCmdSweepAccentAbs3: /* <1l> = new accent, <2xs> = # of beats to get there */
  669.                     SweepToNewValue(Updator->CurrentAccent3,Updator->Accent3Change,
  670.                         &Updator->Accent3ChangeCountdown,Note->a.Command.Argument1,
  671.                         Note->a.Command.Argument2);
  672.                     break;
  673.                 case eCmdSweepAccentRel3: /* <1l> = accent adjust, <2xs> = # of beats to get there */
  674.                     SweepToAdjustedValue(Updator->CurrentAccent3,Updator->Accent3Change,
  675.                         &Updator->Accent3ChangeCountdown,Note->a.Command.Argument1,
  676.                         Note->a.Command.Argument2);
  677.                     break;
  678.  
  679.                 case eCmdRestoreAccent4: /* restore accent value to master default */
  680.                     Updator->CurrentAccent4 = Updator->DefaultAccent4;
  681.                     Updator->Accent4ChangeCountdown = 0;
  682.                     break;
  683.                 case eCmdSetAccent4: /* specify the new default accent in <1l> */
  684.                     Updator->CurrentAccent4 = Note->a.Command.Argument1;
  685.                     Updator->Accent4ChangeCountdown = 0;
  686.                     break;
  687.                 case eCmdIncAccent4: /* add <1l> to the default accent */
  688.                     Updator->CurrentAccent4 += Note->a.Command.Argument1;
  689.                     Updator->Accent4ChangeCountdown = 0;
  690.                     break;
  691.                 case eCmdSweepAccentAbs4: /* <1l> = new accent, <2xs> = # of beats to get there */
  692.                     SweepToNewValue(Updator->CurrentAccent4,Updator->Accent4Change,
  693.                         &Updator->Accent4ChangeCountdown,Note->a.Command.Argument1,
  694.                         Note->a.Command.Argument2);
  695.                     break;
  696.                 case eCmdSweepAccentRel4: /* <1l> = accent adjust, <2xs> = # of beats to get there */
  697.                     SweepToAdjustedValue(Updator->CurrentAccent4,Updator->Accent4Change,
  698.                         &Updator->Accent4ChangeCountdown,Note->a.Command.Argument1,
  699.                         Note->a.Command.Argument2);
  700.                     break;
  701.  
  702.                 case eCmdRestorePitchDispDepth: /* restore max pitch disp depth value to default */
  703.                     Updator->CurrentPitchDisplacementDepthLimit = Updator->DefaultPitchDisplacementDepthLimit;
  704.                     Updator->PitchDisplacementDepthLimitChangeCountdown = 0;
  705.                     break;
  706.                 case eCmdSetPitchDispDepth: /* set new max pitch disp depth <1l> */
  707.                     Updator->CurrentPitchDisplacementDepthLimit = Note->a.Command.Argument1;
  708.                     Updator->PitchDisplacementDepthLimitChangeCountdown = 0;
  709.                     break;
  710.                 case eCmdIncPitchDispDepth: /* add <1l> to the default pitch disp depth */
  711.                     Updator->CurrentPitchDisplacementDepthLimit += Note->a.Command.Argument1;
  712.                     Updator->PitchDisplacementDepthLimitChangeCountdown = 0;
  713.                     break;
  714.                 case eCmdPitchDispDepthMode: /* <1i>:  -1: Hertz, 0: half-steps */
  715.                     Updator->PitchDisplacementDepthHertz = (Note->a.Command.Argument1 < 0);
  716.                     break;
  717.                 case eCmdSweepPitchDispDepthAbs: /* <1l> = new depth, <2xs> = # of beats */
  718.                     SweepToNewValue(Updator->CurrentPitchDisplacementDepthLimit,
  719.                         Updator->PitchDisplacementDepthLimitChange,
  720.                         &Updator->PitchDisplacementDepthLimitChangeCountdown,
  721.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  722.                     break;
  723.                 case eCmdSweepPitchDispDepthRel: /* <1l> = depth adjust, <2xs> = # of beats */
  724.                     SweepToAdjustedValue(Updator->CurrentPitchDisplacementDepthLimit,
  725.                         Updator->PitchDisplacementDepthLimitChange,
  726.                         &Updator->PitchDisplacementDepthLimitChangeCountdown,
  727.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  728.                     break;
  729.  
  730.                 case eCmdRestorePitchDispRate: /* restore max pitch disp rate to the master default */
  731.                     Updator->CurrentPitchDisplacementRateLimit = Updator->DefaultPitchDisplacementRateLimit;
  732.                     Updator->PitchDisplacementRateLimitChangeCountdown = 0;
  733.                     break;
  734.                 case eCmdSetPitchDispRate: /* set new max pitch disp rate in seconds to <1l> */
  735.                     Updator->CurrentPitchDisplacementRateLimit = Note->a.Command.Argument1;
  736.                     Updator->PitchDisplacementRateLimitChangeCountdown = 0;
  737.                     break;
  738.                 case eCmdIncPitchDispRate: /* add <1l> to the default max pitch disp rate */
  739.                     Updator->CurrentPitchDisplacementRateLimit += Note->a.Command.Argument1;
  740.                     Updator->PitchDisplacementRateLimitChangeCountdown = 0;
  741.                     break;
  742.                 case eCmdSweepPitchDispRateAbs: /* <1l> = new rate, <2xs> = # of beats to get there */
  743.                     SweepToNewValue(Updator->CurrentPitchDisplacementRateLimit,
  744.                         Updator->PitchDisplacementRateLimitChange,
  745.                         &Updator->PitchDisplacementRateLimitChangeCountdown,
  746.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  747.                     break;
  748.                 case eCmdSweepPitchDispRateRel: /* <1l> = rate adjust, <2xs> = # of beats to get there */
  749.                     SweepToAdjustedValue(Updator->CurrentPitchDisplacementRateLimit,
  750.                         Updator->PitchDisplacementRateLimitChange,
  751.                         &Updator->PitchDisplacementRateLimitChangeCountdown,
  752.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  753.                     break;
  754.  
  755.                 case eCmdRestorePitchDispStart: /* restore pitch disp start point to default */
  756.                     Updator->CurrentPitchDisplacementStartPoint = Updator->DefaultPitchDisplacementStartPoint;
  757.                     Updator->PitchDisplacementStartPointChangeCountdown = 0;
  758.                     break;
  759.                 case eCmdSetPitchDispStart: /* set the start point to <1l> */
  760.                     Updator->CurrentPitchDisplacementStartPoint = Note->a.Command.Argument1;
  761.                     Updator->PitchDisplacementStartPointChangeCountdown = 0;
  762.                     break;
  763.                 case eCmdIncPitchDispStart: /* add <1l> to the pitch disp start point */
  764.                     Updator->CurrentPitchDisplacementStartPoint += Note->a.Command.Argument1;
  765.                     Updator->PitchDisplacementStartPointChangeCountdown = 0;
  766.                     break;
  767.                 case eCmdPitchDispStartOrigin: /* specify the origin, same as for release point <1i> */
  768.                     Updator->PitchDisplacementStartPointFromStart = (Note->a.Command.Argument1 < 0);
  769.                     break;
  770.                 case eCmdSweepPitchDispStartAbs: /* <1l> = new vib start, <2xs> = # of beats */
  771.                     SweepToNewValue(Updator->CurrentPitchDisplacementStartPoint,
  772.                         Updator->PitchDisplacementStartPointChange,
  773.                         &Updator->PitchDisplacementStartPointChangeCountdown,
  774.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  775.                     break;
  776.                 case eCmdSweepPitchDispStartRel: /* <1l> = vib adjust, <2xs> = # of beats */
  777.                     SweepToAdjustedValue(Updator->CurrentPitchDisplacementStartPoint,
  778.                         Updator->PitchDisplacementStartPointChange,
  779.                         &Updator->PitchDisplacementStartPointChangeCountdown,
  780.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  781.                     break;
  782.  
  783.                 case eCmdRestoreHurryUp: /* restore default hurryup factor */
  784.                     Updator->CurrentHurryUp = Updator->DefaultHurryUp;
  785.                     Updator->HurryUpChangeCountdown = 0;
  786.                     break;
  787.                 case eCmdSetHurryUp: /* set the hurryup factor to <1l> */
  788.                     Updator->CurrentHurryUp = Note->a.Command.Argument1;
  789.                     Updator->HurryUpChangeCountdown = 0;
  790.                     break;
  791.                 case eCmdIncHurryUp: /* multiply <1l> by the hurryup factor */
  792.                     Updator->CurrentHurryUp *= Note->a.Command.Argument1;
  793.                     Updator->HurryUpChangeCountdown = 0;
  794.                     break;
  795.                 case eCmdSweepHurryUpAbs: /* <1l> = new hurryup factor, <2xs> = # of beats */
  796.                     SweepToNewValue(Updator->CurrentHurryUp,Updator->HurryUpChange,
  797.                         &Updator->HurryUpChangeCountdown,Note->a.Command.Argument1,
  798.                         Note->a.Command.Argument2);
  799.                     break;
  800.                 case eCmdSweepHurryUpRel: /* <1l> = hurryup adjust, <2xs> = # of beats to get there */
  801.                     SweepToAdjustedValue(Updator->CurrentHurryUp,
  802.                         Updator->HurryUpChange,&Updator->HurryUpChangeCountdown,
  803.                         Note->a.Command.Argument1,Note->a.Command.Argument2);
  804.                     break;
  805.  
  806.                 case eCmdRestoreDetune: /* restore the default detune factor */
  807.                     Updator->CurrentDetune = Updator->DefaultDetune;
  808.                     Updator->DetuneChangeCountdown = 0;
  809.                     break;
  810.                 case eCmdSetDetune: /* set the detune factor to <1l> */
  811.                     Updator->CurrentDetune = Note->a.Command.Argument1;
  812.                     Updator->DetuneChangeCountdown = 0;
  813.                     break;
  814.                 case eCmdIncDetune: /* add <1l> to current detune factor */
  815.                     Updator->CurrentDetune += Note->a.Command.Argument1;
  816.                     Updator->DetuneChangeCountdown = 0;
  817.                     break;
  818.                 case eCmdDetuneMode: /* <1i>:  -1: Hertz, 0: half-steps */
  819.                     Updator->DetuneHertz = (Note->a.Command.Argument1 < 0);
  820.                     break;
  821.                 case eCmdSweepDetuneAbs: /* <1l> = new detune, <2xs> = # of beats */
  822.                     SweepToNewValue(Updator->CurrentDetune,Updator->DetuneChange,
  823.                         &Updator->DetuneChangeCountdown,Note->a.Command.Argument1,
  824.                         Note->a.Command.Argument2);
  825.                     break;
  826.                 case eCmdSweepDetuneRel: /* <1l> = detune adjust, <2xs> = # of beats */
  827.                     SweepToAdjustedValue(Updator->CurrentDetune,Updator->DetuneChange,
  828.                         &Updator->DetuneChangeCountdown,Note->a.Command.Argument1,
  829.                         Note->a.Command.Argument2);
  830.                     break;
  831.  
  832.                 case eCmdRestoreEarlyLateAdjust: /* restore the default early/late adjust value */
  833.                     Updator->CurrentEarlyLateAdjust = Updator->DefaultEarlyLateAdjust;
  834.                     Updator->EarlyLateAdjustChangeCountdown = 0;
  835.                     break;
  836.                 case eCmdSetEarlyLateAdjust: /* set the early/late adjust value to <1l> */
  837.                     Updator->CurrentEarlyLateAdjust = Note->a.Command.Argument1;
  838.                     Updator->EarlyLateAdjustChangeCountdown = 0;
  839.                     break;
  840.                 case eCmdIncEarlyLateAdjust: /* add <1l> to the current early/late adjust value */
  841.                     Updator->CurrentEarlyLateAdjust += Note->a.Command.Argument1;
  842.                     Updator->EarlyLateAdjustChangeCountdown = 0;
  843.                     break;
  844.                 case eCmdSweepEarlyLateAbs: /* <1l> = new early/late adjust, <2xs> = # of beats */
  845.                     SweepToNewValue(Updator->CurrentEarlyLateAdjust,Updator->EarlyLateAdjustChange,
  846.                         &Updator->EarlyLateAdjustChangeCountdown,Note->a.Command.Argument1,
  847.                         Note->a.Command.Argument2);
  848.                     break;
  849.                 case eCmdSweepEarlyLateRel: /* <1l> = early/late delta, <2xs> = # of beats to get there */
  850.                     SweepToAdjustedValue(Updator->CurrentEarlyLateAdjust,Updator->EarlyLateAdjustChange,
  851.                         &Updator->EarlyLateAdjustChangeCountdown,Note->a.Command.Argument1,
  852.                         Note->a.Command.Argument2);
  853.                     break;
  854.  
  855.                 case eCmdRestoreDurationAdjust: /* restore the default duration adjust value */
  856.                     Updator->CurrentDurationAdjust = Updator->DefaultDurationAdjust;
  857.                     Updator->DurationAdjustChangeCountdown = 0;
  858.                     break;
  859.                 case eCmdSetDurationAdjust: /* set duration adjust value to <1l> */
  860.                     Updator->CurrentDurationAdjust = Note->a.Command.Argument1;
  861.                     Updator->DurationAdjustChangeCountdown = 0;
  862.                     break;
  863.                 case eCmdIncDurationAdjust: /* add <1l> to the current duration adjust value */
  864.                     Updator->CurrentDurationAdjust += Note->a.Command.Argument1;
  865.                     Updator->DurationAdjustChangeCountdown = 0;
  866.                     break;
  867.                 case eCmdSweepDurationAbs: /* <1l> = new duration adjust, <2xs> = # of beats */
  868.                     SweepToNewValue(Updator->CurrentDurationAdjust,Updator->DurationAdjustChange,
  869.                         &Updator->DurationAdjustChangeCountdown,Note->a.Command.Argument1,
  870.                         Note->a.Command.Argument2);
  871.                     break;
  872.                 case eCmdSweepDurationRel: /* <1l> = duration adjust delta, <2xs> = # of beats */
  873.                     SweepToAdjustedValue(Updator->CurrentDurationAdjust,Updator->DurationAdjustChange,
  874.                         &Updator->DurationAdjustChangeCountdown,Note->a.Command.Argument1,
  875.                         Note->a.Command.Argument2);
  876.                     break;
  877.                 case eCmdDurationAdjustMode: /* <1i>:  -1: Multiplicative, 0: Additive */
  878.                     Updator->DurationAdjustAdditive = (Note->a.Command.Argument1 >= 0);
  879.                     break;
  880.  
  881.                 case eCmdSetMeter: /* <1i> = numerator, <2i> = denominator */
  882.                     break;
  883.                 case eCmdSetMeasureNumber: /* <1i> = new number */
  884.                     break;
  885.  
  886.                 case eCmdSetTranspose: /* <1i> = new transpose value */
  887.                     Updator->TransposeHalfsteps = Note->a.Command.Argument1;
  888.                     break;
  889.                 case eCmdAdjustTranspose: /* <1i> = transpose adjustor */
  890.                     Updator->TransposeHalfsteps += Note->a.Command.Argument1;
  891.                     break;
  892.  
  893.                 case eCmdMarker: /* <string> holds the text */
  894.                     break;
  895.             }
  896.     }
  897.